import { getPropsList,resetAttr } from "../attr"
import { selectModeOptions } from "../../lib/const"
import EventBus from "../../EventBus"
import store from '@/store'
const attr = ({selectFilterFieldList = [], selectFilterFieldOptions = []}) => [
  {
    type: "custom",
    label: "value",
    fieldName: "value",
    extraConfig: {
      className: "row",
    },
    initialValue: () => {},
    dataType: Object,
  },
  // {
  //   type: "select",
  //   label: "widgetType",
  //   fieldName: "widgetType",
  //   options: [],
  //   extraConfig: {
  //     className: "row",
  //   },
  //   initialValue: "Table",
  //   dataType: String,
  // },
  {
    type: "switch",
    label: "loading",
    fieldName: "loading",
    extraConfig: {
      className: "row",
    },
    initialValue: false,
    dataType: Boolean,
  },
  {
    type: "custom",
    label: "filterKeys",
    fieldName: "filterKeys",
    extraConfig: {
      className: "row",
    },
    initialValue: () => [],
    dataType: Array,
  },
  {
    type: "custom",
    label: "updateComponent", // 主动触发更新
    fieldName: "updateComponent",
    extraConfig: {
      className: "row",
    },
    initialValue: () => 0,
    dataType: Number,
  },
  {
    type: "custom",
    label: "updateComponentTitle", // 主动触发更新
    fieldName: "updateComponentTitle",
    extraConfig: {
      className: "row",
    },
    initialValue: () => 0,
    dataType: Number,
  },

]
export function getProps(data){
  return getPropsList(attr(data = {}))
}

export default {
  attr,
}


